using UnityEngine;
using UnityEngine.UI;

public class CloseWindow : MonoBehaviour
{
    public Button m_button;

    void Start()
    {
        m_button.onClick.AddListener(OnExitGame);
        Show();
    }

    public void Show()
    {
        transform.localPosition = Vector2.zero;
    }

    public void OnExitGame()
    {

#if UNITY_EDITOR
        UnityEditor.EditorApplication.isPlaying = false;
#else
        Application.Quit();
#endif

    }
}
